package net.pet.commons.controller;


import javax.servlet.http.HttpServletRequest;

import net.pet.commons.helper.SessionHelper;
import net.pet.dto.admin.AdminUser;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class InitController {
	@RequestMapping(value = "/main", method = RequestMethod.GET)
	public String main() {
		return "/main";
	}
	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public String index() {
		return "/index";
	}
	@RequestMapping(value = "/left", method = RequestMethod.GET)
	public ModelAndView left(ModelMap modelMap,HttpServletRequest request) {
		AdminUser user = SessionHelper.getAdminUser(request);
		modelMap.put("adminUser", user);
		return new ModelAndView("/left", modelMap);
	}
	@RequestMapping(value = "/right", method = RequestMethod.GET)
	public String rightframe() {
		return "/right";
	}
	@RequestMapping(value = "/top", method = RequestMethod.GET)
	public String top() {
		return "/top";
	}
	@RequestMapping(value = "/welcome", method = RequestMethod.GET)
	public String welcome() {
		return "/welcome";
	}
}
